package com.neuedu.hcp.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class MyBatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        //默认为false，为true时，当分页第二页剩最后一条数据时删除，如果没有该条语句第一页将不会重新查找，加上该条语句
        //第一页会显示出来
        paginationInterceptor.setOverflow(true);
        return paginationInterceptor;
    }
}
